REPLICATION FILES FOR: "More Options, but Less Willing to Cast a Valid Vote: Evidence from Electoral Reform in Chile"
Loreto Cox and Carmen Le Foulon



GENERAL
The user must create two folders in her working directory ("tables" and "figures"), for saving tables and figures, respectively.

CODE FILES 
1. "R_1.Rmd": R markdown for reproducing Figures 1, 4, A1, A2. It uses "base_comunas_distritos.rds", "resultados_elecciones_diputados_ce_1989_2017.xlsx", "2021_11_Diputados_Votacion.txt", "pred_plot.xlsx".
2. "R_2.do": Do file (stata) for reproducing Figures 2, 3, 5, 6, 7, 8, 9, 10, A3, A4, Tables 1, 2, 3, A1, A2, A3, A4, SM1, SM2, SM3, SM4, and generates the data for Figure 4. It uses "fig2_data.dta", "district_votes.dta", "fig5_data.dta", "fig8_data.dta", "survey_data.dta", "tot21.dta", "servel_data.dta", "municipality_votes.dta", "ponderadores.dta".
3. "R_fig A5.Rmd": R markdown for reproducing Figure A5. It uses "pres_hist.csv" and "comunas_dist.csv".
4. "R_SM_A1.Rmd": R markdown for reproducing Figures SM1 & SM2. It uses "idea_export_voter_turnout_database_region.xlsx", "idea_export_electoral_system_design_database.xlsx", and "V-Dem-CY-Full+Others-v13.rds".
5. "R_SM_A5.Rmd": R markdown for reproducing Figures SM4, SM5, SM6, and SM7. It uses "pop_elec2017.rds", "pop_elec2021.rds", "m_dip.rds", "cep69_dist.rds", "cep71_dist.rds", "cep79_dist.rds", "cep82_dist.rds", "cep85_dist.rds", and "cep86_dist.rds".
6. "R_SM6": R markdown for reproducing Figure SM8 and Table 4. It uses "mag.dta", "idea_turnout_xls", and "idea_country_code.xls"

CODEBOOK
1. "Codebook.pdf": Codebook for all the databases 

DATA BASES
1."base_comunas_distritos.rds": data on district id and district magnitude pre- and post-reform by municipality. Own elaboration from Servel data.
2. "resultados_elecciones_diputados_ce_1989_2017.xlsx": Data on Lower House election results from 1989 to 2017 by candidate/municipality/year from Servel, available at https://www.servel.cl/centro-de-datos/procesos-electorales-detalle/?id=2, downloaded on November 10, 2023.
3. "2021_11_Diputados_Votacion.txt" Data on 2021 Lower House election results  by candidate/electoral booth from Servel, available at https://www.servel.cl/centro-de-datos/procesos-electorales-detalle/?id=2, downloaded on November 10, 2023.
4. "pred_plot.xlsx": data with predicted values from Model 2, Table 1 - obtained from R_2.do
5. "fig2_data.dta": data on election results from 1989 to 2021 by year, own elaboration based on Servel data. 
6. "district_votes.dta": data on President, Senate and Lower House elections results from 1989 to 2021 by pre-reform district/year, own elaboration based on Servel data. 
7. "fig5_data.dta": data on 2021 President and Lower House elections results by pre-reform district, own elaboration based on Servel data. 
8. "fig8_data.dta": data on 2021 Senate elections results by pre-reform district, own elaboration based on Servel data. 
9. "survey_data.dta": our survey data by respondents, collected with Netquest panels, using Qualtrics.
10. "tot21.dta": data on 2021 President, Senate and Lower House elections results by pre-reform district/type of election, own elaboration based on Servel data. 
11. "servel_data.dta": data on President and Lower House elections results from  2017 and 2013 and on municipality characteristics by municipality/type of election/year, own elaboration based on Servel data
12. "municipality_votes.dta": data on President, Senate and Lower House elections results from 2017 and 2009 by municipality, own elaboration based on Servel data. 
13. "ponderadores.dta": summary data of Census population and survey data, own elaboration based on INE.
14. "pres_hist.csv": database with historical results for presidential elections, source: Servel
15. "comunas_dist.csv": database with municipalities, districts, and seats by election type, source: Servel
16. "pop_elec2017.rds": data on population distribution on post-reform 2017 districts by district/sex/education level/age group/rural or urban, own elaboration based on INE data.
17. "pop_elec2021.rds": data on population distribution on post-reform 2021 districts by district/sex/education level/age group/rural or urban, own elaboration based on INE data.
18. "m_dip.rds": data on district magnitude by post-reform district, own elaboration based on Servel. 
19. "cep69mrp_dist.rds": CEP 69 survey data by respondent, reduced dataset with district variable added, source: Base de Datos Consolidada, Centro de Estudios Públicos, available at https://www.cepchile.cl/opinion-publica/encuesta-cep/.
20. "cep71mrp_dist.rds": CEP 71 survey data by respondent, reduced dataset with district variable added, source: Base de Datos Consolidada, Centro de Estudios Públicos, available at https://www.cepchile.cl/opinion-publica/encuesta-cep/.
21. "cep79mrp_dist.rds": CEP 79 survey data by respondent, reduced dataset with district variable added, source: Base de Datos Consolidada, Centro de Estudios Públicos, available at https://www.cepchile.cl/opinion-publica/encuesta-cep/.
22. "cep82mrp_dist.rds": CEP 82 survey data by respondent, reduced dataset with district variable added, source: Base de Datos Consolidada, Centro de Estudios Públicos, available at https://www.cepchile.cl/opinion-publica/encuesta-cep/.
23. "cep85mrp_dist.rds": CEP 85 survey data by respondent, reduced dataset with district variable added, source: Base de Datos Consolidada, Centro de Estudios Públicos, available at https://www.cepchile.cl/opinion-publica/encuesta-cep/.
24. "cep86mrp_dist.rds": CEP 86 survey data by respondent, reduced dataset with district variable added, source: Base de Datos Consolidada, Centro de Estudios Públicos, available at https://www.cepchile.cl/opinion-publica/encuesta-cep/.
25. "mag.dta": Data on average district magnitude by country/year, from Bormann & Golder (2022); available at https://datafinder.qog.gu.se/dataset/gol; http://mattgolder.com/elections
26. "idea_turnout_xls": International IDEA’s Voter Turnout Database, downloaded from https://www.idea.int/data-tools/data/voter-turnout-database, downloaded on November, 30, 2022
27. "idea_country_code.xls": database with Idea International country codes
28. "idea_export_voter_turnout_database_region.xlsx": International IDEA’s Voter Turnout Database, downloaded from https://www.idea.int/data-tools/data/voter-turnout-database January 16, 2024,  from:
29. "idea_export_electoral_system_design_database.xlsx": International IDEA’s Electoral System Design Database, downloaded from https://www.idea.int/data-tools/data/electoral-system-design-database on January 16, 2024.
30.  "V-Dem-CY-Full+Others-v13.rds": V-Dem Dataset downloaded from https://www.v-dem.net/data/the-v-dem-dataset/ on January 16, 2024.




SURVEY USER'S GUIDE

Software versions:

1. R version 4.3.1 (2023-06-16)
2. RStudio 2023.06.1
3. R packages: tidyverse_2.0.0; readxl 1.4.3; janitor_2.2.0; readr_2.1.4; lubridate_1.9.3; tidybayes_3.0.4; brms_2.19.0; haven_2.5.3 
4. Stata/SE 17.0 for Mac (Apple Silicon) - Revision 15 Nov 2022
5. Stata packages: asdoc 2.3.9.5; outreg2 2.3.2; ereplace 1.0.3, blindschemes
5. Run under: macOS Ventura 13.5.1 (Platform: aarch64-apple-darwin20 (64-bit))




